import { FC } from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { ConfigProvider } from "antd";
import zh_CN from 'antd/locale/zh_CN';
import AuthRoute from "./common/config/AuthRoute";
import UserHomePage from "./user/homepage/UserHomePage";
import UserLogin from "./user/homepage/user/UserLogin";


const WeStudy: FC = () => {
  return (
    <>
      <ConfigProvider locale={zh_CN}>
        <BrowserRouter>
          <Routes>
            <Route path="/login" element={<UserLogin />} />
            <Route path="/*" element={<AuthRoute><UserHomePage /></AuthRoute>}
            />
          </Routes>
        </BrowserRouter>
      </ConfigProvider>
    </>
  );
};

export default WeStudy;
